﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MailServer {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
            //Server.Server s1 = new Server.Server("", "");
            //Client.Client c1 = new Client.Client(s1, "cliente1");
            //Client.Client c2 = new Client.Client(s1, "cliente2");
            //Client.Client c3 = new Client.Client(s1, "cliente3");
            //c1.SendMessage("cliente2", "prueba1", "el mensaje");
            //c3.SendMessage("cliente2", "prueba3", "el mensaje de cliente3");
            //agregarTexto(c2.CheckMessages().ToString());
            //agregarTexto(c2.ReadNextMessage().ToString());
            //agregarTexto(c2.CheckMessages().ToString());
            //agregarTexto(c2.ReadNextMessage().ToString());
            //agregarTexto(c2.CheckMessages().ToString());
        }

        private void agregarTexto(string texto) {
            //txMsgs.Text += "[" + DateTime.Now.ToString("HH:mm:ss") + "]: " + texto + System.Environment.NewLine;
        }

        private void button1_Click(object sender, EventArgs e) {
            FServer f = new FServer();
            f.Show(this);
        }

        private void button2_Click(object sender, EventArgs e) {
            FCliente f = new FCliente();
            f.Show(this);
        }
    }
}
